using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._GeodatabaseAdministration
{
    /// <summary>
    /// <para>Upgrade Geodatabase</para>
    /// <para>Upgrades a geodatabase to the latest ArcGIS release to take advantage of new functionality.</para>
    /// <para>将地理数据库升级到最新的 ArcGIS 版本以利用新功能。</para>
    /// </summary>    
    [DisplayName("Upgrade Geodatabase")]
    public class UpgradeGDB : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpgradeGDB()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_workspace">
        /// <para>Input Geodatabase</para>
        /// <para>The geodatabase to upgrade. When upgrading an enterprise geodatabase, specify a database connection file (.sde) that connects to the geodatabase as the geodatabase administrator.</para>
        /// <para>要升级的地理数据库。升级企业级地理数据库时，请指定连接到地理数据库的数据库连接文件 （.sde） 作为地理数据库管理员。</para>
        /// </param>
        /// <param name="_input_prerequisite_check">
        /// <para>Perform Pre-Requisite Check</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the prerequisite check will be run before upgrading the geodatabase.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The prerequisite check will not be run. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The prerequisite check will be run before upgrading the geodatabase.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在升级地理数据库之前是否运行先决条件检查。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会运行先决条件检查。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 在升级地理数据库之前，将运行先决条件检查。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_input_upgradegdb_check">
        /// <para>Upgrade Geodatabase</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input geodatabase will be upgraded to match the release of the ArcGIS client from which you are running the tool.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The geodatabase will not be upgraded. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The geodatabase will be upgraded.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否升级输入地理数据库以匹配运行该工具的 ArcGIS 客户端版本。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会升级地理数据库。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 地理数据库将升级。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public UpgradeGDB(object _input_workspace, _input_prerequisite_check_value _input_prerequisite_check, _input_upgradegdb_check_value _input_upgradegdb_check)
        {
            this._input_workspace = _input_workspace;
            this._input_prerequisite_check = _input_prerequisite_check;
            this._input_upgradegdb_check = _input_upgradegdb_check;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Upgrade Geodatabase";

        public override string CallName => "management.UpgradeGDB";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_input_workspace, _input_prerequisite_check.GetGPValue(), _input_upgradegdb_check.GetGPValue(), _out_workspace];

        /// <summary>
        /// <para>Input Geodatabase</para>
        /// <para>The geodatabase to upgrade. When upgrading an enterprise geodatabase, specify a database connection file (.sde) that connects to the geodatabase as the geodatabase administrator.</para>
        /// <para>要升级的地理数据库。升级企业级地理数据库时，请指定连接到地理数据库的数据库连接文件 （.sde） 作为地理数据库管理员。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_workspace { get; set; }


        /// <summary>
        /// <para>Perform Pre-Requisite Check</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the prerequisite check will be run before upgrading the geodatabase.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The prerequisite check will not be run. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The prerequisite check will be run before upgrading the geodatabase.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在升级地理数据库之前是否运行先决条件检查。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会运行先决条件检查。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 在升级地理数据库之前，将运行先决条件检查。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Perform Pre-Requisite Check")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _input_prerequisite_check_value _input_prerequisite_check { get; set; }

        public enum _input_prerequisite_check_value
        {
            /// <summary>
            /// <para>PREREQUISITE_CHECK</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PREREQUISITE_CHECK")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_PREREQUISITE_CHECK</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_PREREQUISITE_CHECK")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Upgrade Geodatabase</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input geodatabase will be upgraded to match the release of the ArcGIS client from which you are running the tool.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The geodatabase will not be upgraded. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The geodatabase will be upgraded.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否升级输入地理数据库以匹配运行该工具的 ArcGIS 客户端版本。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会升级地理数据库。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 地理数据库将升级。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Upgrade Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _input_upgradegdb_check_value _input_upgradegdb_check { get; set; }

        public enum _input_upgradegdb_check_value
        {
            /// <summary>
            /// <para>UPGRADE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPGRADE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_UPGRADE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_UPGRADE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Input Geodatabase</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public UpgradeGDB SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}